package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SFriendBlessInfo extends Object implements IMessageBase
    {
        public var blessKey:SFriendBlessKey;
        public var toPlayerId:int;
        public var blessLevel:int;
        public var fromPlayerId:int;
        public var fromPlayerName:String;
        public var fromPlayerSex:int;
        public var fromPlayerCamp:int;
        public var fromPlayerCareer:int;
        public var timeOutDt:Date;
        public var blessRewardExp:int;
        public const _type:int = 81;
        public static var _regist:SFriendBlessInfo = new SFriendBlessInfo(true);

        public function SFriendBlessInfo(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            
        }

        public function getType() : int
        {
            return this._type;
        }

        public function clone() : IMessageBase
        {
            return new SFriendBlessInfo();
        }

        public function __write(param1:SerializeStream) : void
        {
            this.blessKey.__write(param1);
            param1.writeInt(this.toPlayerId);
            param1.writeByte(this.blessLevel);
            param1.writeInt(this.fromPlayerId);
            param1.writeString(this.fromPlayerName);
            param1.writeByte(this.fromPlayerSex);
            param1.writeByte(this.fromPlayerCamp);
            param1.writeShort(this.fromPlayerCareer);
            param1.writeDate(this.timeOutDt);
            param1.writeInt(this.blessRewardExp);
            
        }

        public function __read(param1:SerializeStream) : void
        {
            this.blessKey = new SFriendBlessKey();
            this.blessKey.__read(param1);
            this.toPlayerId = param1.readInt();
            this.blessLevel = param1.readByte();
            this.fromPlayerId = param1.readInt();
            this.fromPlayerName = param1.readString();
            this.fromPlayerSex = param1.readByte();
            this.fromPlayerCamp = param1.readByte();
            this.fromPlayerCareer = param1.readShort();
            this.timeOutDt = param1.readDate();
            this.blessRewardExp = param1.readInt();
            
        }

    }
}
